import javax.xml.soap.Node;
import java.util.LinkedList;
import java.util.Scanner;

public class TestDay28 {


    static class Node {
        Node next;
        int value;

        public Node(int value) {
            this.value = value;
        }
    }

    static Node head = null;

    //翻转单链表
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Node cur = null;
        for (int i = 0; i < n; i++) {
            if (cur == null) {
                cur = new Node(scanner.nextInt());
                head = cur;
            } else {
                cur.next = new Node(scanner.nextInt());
                cur = cur.next;
            }

        }
        int left = scanner.nextInt();
        int right = scanner.nextInt();
        reversal(left, right);
        cur = head;
        while (cur != null) {
            System.out.print(cur.value + " ");
            cur = cur.next;
        }

    }

    public static void reversal(int left, int right) {
        Node prev = null;
        Node cur = head;
        Node last = head;
        for (int i = left; i > 1; i--) {
            prev = cur;
            cur = cur.next;
            if (i != 2) {
                last = cur;
            }
        }
        Node tmp = cur;
        Node curNext = cur;
        for (int i = 0; i <= right - left; i++) {
            cur = curNext;
            curNext = cur.next;
            cur.next = prev;
            prev = cur;
        }
        last.next = cur;

        tmp.next = curNext;

        if (tmp == head) {
            head = cur;
        }

    }


    public static void main(String[] args) {

        //猴子分桃
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            //小猴子数量
            int n = scanner.nextInt();
            long z = -20;//总共的桃子
            long q = 0;
            for (int i = 1; i < n; i++) {
                z = z*5+100;
                q = q*4+12;
                //需要保证-1/5*4是整数
            }
            System.out.println(z+21+" "+(n+q));
        }
    }






}
